<!DOCTYPE html>
<!-- saved from url=(0014)about:internet -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="x-ua-compatible" content="IE=9" >

<title>rep_fig2.r</title>

<style type="text/css">
body, td {
   font-family: sans-serif;
   background-color: white;
   font-size: 12px;
   margin: 8px;
}

tt, code, pre {
   font-family: 'DejaVu Sans Mono', 'Droid Sans Mono', 'Lucida Console', Consolas, Monaco, monospace;
}

h1 { 
   font-size:2.2em; 
}

h2 { 
   font-size:1.8em; 
}

h3 { 
   font-size:1.4em; 
}

h4 { 
   font-size:1.0em; 
}

h5 { 
   font-size:0.9em; 
}

h6 { 
   font-size:0.8em; 
}

a:visited {
   color: rgb(50%, 0%, 50%);
}

pre {	
   margin-top: 0;
   max-width: 95%;
   border: 1px solid #ccc;
   white-space: pre-wrap;
}

pre code {
   display: block; padding: 0.5em;
}

code.r, code.cpp {
   background-color: #F8F8F8;
}

table, td, th {
  border: none;
}

blockquote {
   color:#666666;
   margin:0;
   padding-left: 1em;
   border-left: 0.5em #EEE solid;
}

hr {
   height: 0px;
   border-bottom: none;
   border-top-width: thin;
   border-top-style: dotted;
   border-top-color: #999999;
}

@media print {
   * { 
      background: transparent !important; 
      color: black !important; 
      filter:none !important; 
      -ms-filter: none !important; 
   }

   body { 
      font-size:12pt; 
      max-width:100%; 
   }
       
   a, a:visited { 
      text-decoration: underline; 
   }

   hr { 
      visibility: hidden;
      page-break-before: always;
   }

   pre, blockquote { 
      padding-right: 1em; 
      page-break-inside: avoid; 
   }

   tr, img { 
      page-break-inside: avoid; 
   }

   img { 
      max-width: 100% !important; 
   }

   @page :left { 
      margin: 15mm 20mm 15mm 10mm; 
   }
     
   @page :right { 
      margin: 15mm 10mm 15mm 20mm; 
   }

   p, h2, h3 { 
      orphans: 3; widows: 3; 
   }

   h2, h3 { 
      page-break-after: avoid; 
   }
}

</style>

<!-- Styles for R syntax highlighter -->
<style type="text/css">
   pre .operator,
   pre .paren {
     color: rgb(104, 118, 135)
   }

   pre .literal {
     color: rgb(88, 72, 246)
   }

   pre .number {
     color: rgb(0, 0, 205);
   }

   pre .comment {
     color: rgb(76, 136, 107);
   }

   pre .keyword {
     color: rgb(0, 0, 255);
   }

   pre .identifier {
     color: rgb(0, 0, 0);
   }

   pre .string {
     color: rgb(3, 106, 7);
   }
</style>

<!-- R syntax highlighter -->
<script type="text/javascript">
var hljs=new function(){function m(p){return p.replace(/&/gm,"&amp;").replace(/</gm,"&lt;")}function f(r,q,p){return RegExp(q,"m"+(r.cI?"i":"")+(p?"g":""))}function b(r){for(var p=0;p<r.childNodes.length;p++){var q=r.childNodes[p];if(q.nodeName=="CODE"){return q}if(!(q.nodeType==3&&q.nodeValue.match(/\s+/))){break}}}function h(t,s){var p="";for(var r=0;r<t.childNodes.length;r++){if(t.childNodes[r].nodeType==3){var q=t.childNodes[r].nodeValue;if(s){q=q.replace(/\n/g,"")}p+=q}else{if(t.childNodes[r].nodeName=="BR"){p+="\n"}else{p+=h(t.childNodes[r])}}}if(/MSIE [678]/.test(navigator.userAgent)){p=p.replace(/\r/g,"\n")}return p}function a(s){var r=s.className.split(/\s+/);r=r.concat(s.parentNode.className.split(/\s+/));for(var q=0;q<r.length;q++){var p=r[q].replace(/^language-/,"");if(e[p]){return p}}}function c(q){var p=[];(function(s,t){for(var r=0;r<s.childNodes.length;r++){if(s.childNodes[r].nodeType==3){t+=s.childNodes[r].nodeValue.length}else{if(s.childNodes[r].nodeName=="BR"){t+=1}else{if(s.childNodes[r].nodeType==1){p.push({event:"start",offset:t,node:s.childNodes[r]});t=arguments.callee(s.childNodes[r],t);p.push({event:"stop",offset:t,node:s.childNodes[r]})}}}}return t})(q,0);return p}function k(y,w,x){var q=0;var z="";var s=[];function u(){if(y.length&&w.length){if(y[0].offset!=w[0].offset){return(y[0].offset<w[0].offset)?y:w}else{return w[0].event=="start"?y:w}}else{return y.length?y:w}}function t(D){var A="<"+D.nodeName.toLowerCase();for(var B=0;B<D.attributes.length;B++){var C=D.attributes[B];A+=" "+C.nodeName.toLowerCase();if(C.value!==undefined&&C.value!==false&&C.value!==null){A+='="'+m(C.value)+'"'}}return A+">"}while(y.length||w.length){var v=u().splice(0,1)[0];z+=m(x.substr(q,v.offset-q));q=v.offset;if(v.event=="start"){z+=t(v.node);s.push(v.node)}else{if(v.event=="stop"){var p,r=s.length;do{r--;p=s[r];z+=("</"+p.nodeName.toLowerCase()+">")}while(p!=v.node);s.splice(r,1);while(r<s.length){z+=t(s[r]);r++}}}}return z+m(x.substr(q))}function j(){function q(x,y,v){if(x.compiled){return}var u;var s=[];if(x.k){x.lR=f(y,x.l||hljs.IR,true);for(var w in x.k){if(!x.k.hasOwnProperty(w)){continue}if(x.k[w] instanceof Object){u=x.k[w]}else{u=x.k;w="keyword"}for(var r in u){if(!u.hasOwnProperty(r)){continue}x.k[r]=[w,u[r]];s.push(r)}}}if(!v){if(x.bWK){x.b="\\b("+s.join("|")+")\\s"}x.bR=f(y,x.b?x.b:"\\B|\\b");if(!x.e&&!x.eW){x.e="\\B|\\b"}if(x.e){x.eR=f(y,x.e)}}if(x.i){x.iR=f(y,x.i)}if(x.r===undefined){x.r=1}if(!x.c){x.c=[]}x.compiled=true;for(var t=0;t<x.c.length;t++){if(x.c[t]=="self"){x.c[t]=x}q(x.c[t],y,false)}if(x.starts){q(x.starts,y,false)}}for(var p in e){if(!e.hasOwnProperty(p)){continue}q(e[p].dM,e[p],true)}}function d(B,C){if(!j.called){j();j.called=true}function q(r,M){for(var L=0;L<M.c.length;L++){if((M.c[L].bR.exec(r)||[null])[0]==r){return M.c[L]}}}function v(L,r){if(D[L].e&&D[L].eR.test(r)){return 1}if(D[L].eW){var M=v(L-1,r);return M?M+1:0}return 0}function w(r,L){return L.i&&L.iR.test(r)}function K(N,O){var M=[];for(var L=0;L<N.c.length;L++){M.push(N.c[L].b)}var r=D.length-1;do{if(D[r].e){M.push(D[r].e)}r--}while(D[r+1].eW);if(N.i){M.push(N.i)}return f(O,M.join("|"),true)}function p(M,L){var N=D[D.length-1];if(!N.t){N.t=K(N,E)}N.t.lastIndex=L;var r=N.t.exec(M);return r?[M.substr(L,r.index-L),r[0],false]:[M.substr(L),"",true]}function z(N,r){var L=E.cI?r[0].toLowerCase():r[0];var M=N.k[L];if(M&&M instanceof Array){return M}return false}function F(L,P){L=m(L);if(!P.k){return L}var r="";var O=0;P.lR.lastIndex=0;var M=P.lR.exec(L);while(M){r+=L.substr(O,M.index-O);var N=z(P,M);if(N){x+=N[1];r+='<span class="'+N[0]+'">'+M[0]+"</span>"}else{r+=M[0]}O=P.lR.lastIndex;M=P.lR.exec(L)}return r+L.substr(O,L.length-O)}function J(L,M){if(M.sL&&e[M.sL]){var r=d(M.sL,L);x+=r.keyword_count;return r.value}else{return F(L,M)}}function I(M,r){var L=M.cN?'<span class="'+M.cN+'">':"";if(M.rB){y+=L;M.buffer=""}else{if(M.eB){y+=m(r)+L;M.buffer=""}else{y+=L;M.buffer=r}}D.push(M);A+=M.r}function G(N,M,Q){var R=D[D.length-1];if(Q){y+=J(R.buffer+N,R);return false}var P=q(M,R);if(P){y+=J(R.buffer+N,R);I(P,M);return P.rB}var L=v(D.length-1,M);if(L){var O=R.cN?"</span>":"";if(R.rE){y+=J(R.buffer+N,R)+O}else{if(R.eE){y+=J(R.buffer+N,R)+O+m(M)}else{y+=J(R.buffer+N+M,R)+O}}while(L>1){O=D[D.length-2].cN?"</span>":"";y+=O;L--;D.length--}var r=D[D.length-1];D.length--;D[D.length-1].buffer="";if(r.starts){I(r.starts,"")}return R.rE}if(w(M,R)){throw"Illegal"}}var E=e[B];var D=[E.dM];var A=0;var x=0;var y="";try{var s,u=0;E.dM.buffer="";do{s=p(C,u);var t=G(s[0],s[1],s[2]);u+=s[0].length;if(!t){u+=s[1].length}}while(!s[2]);if(D.length>1){throw"Illegal"}return{r:A,keyword_count:x,value:y}}catch(H){if(H=="Illegal"){return{r:0,keyword_count:0,value:m(C)}}else{throw H}}}function g(t){var p={keyword_count:0,r:0,value:m(t)};var r=p;for(var q in e){if(!e.hasOwnProperty(q)){continue}var s=d(q,t);s.language=q;if(s.keyword_count+s.r>r.keyword_count+r.r){r=s}if(s.keyword_count+s.r>p.keyword_count+p.r){r=p;p=s}}if(r.language){p.second_best=r}return p}function i(r,q,p){if(q){r=r.replace(/^((<[^>]+>|\t)+)/gm,function(t,w,v,u){return w.replace(/\t/g,q)})}if(p){r=r.replace(/\n/g,"<br>")}return r}function n(t,w,r){var x=h(t,r);var v=a(t);var y,s;if(v){y=d(v,x)}else{return}var q=c(t);if(q.length){s=document.createElement("pre");s.innerHTML=y.value;y.value=k(q,c(s),x)}y.value=i(y.value,w,r);var u=t.className;if(!u.match("(\\s|^)(language-)?"+v+"(\\s|$)")){u=u?(u+" "+v):v}if(/MSIE [678]/.test(navigator.userAgent)&&t.tagName=="CODE"&&t.parentNode.tagName=="PRE"){s=t.parentNode;var p=document.createElement("div");p.innerHTML="<pre><code>"+y.value+"</code></pre>";t=p.firstChild.firstChild;p.firstChild.cN=s.cN;s.parentNode.replaceChild(p.firstChild,s)}else{t.innerHTML=y.value}t.className=u;t.result={language:v,kw:y.keyword_count,re:y.r};if(y.second_best){t.second_best={language:y.second_best.language,kw:y.second_best.keyword_count,re:y.second_best.r}}}function o(){if(o.called){return}o.called=true;var r=document.getElementsByTagName("pre");for(var p=0;p<r.length;p++){var q=b(r[p]);if(q){n(q,hljs.tabReplace)}}}function l(){if(window.addEventListener){window.addEventListener("DOMContentLoaded",o,false);window.addEventListener("load",o,false)}else{if(window.attachEvent){window.attachEvent("onload",o)}else{window.onload=o}}}var e={};this.LANGUAGES=e;this.highlight=d;this.highlightAuto=g;this.fixMarkup=i;this.highlightBlock=n;this.initHighlighting=o;this.initHighlightingOnLoad=l;this.IR="[a-zA-Z][a-zA-Z0-9_]*";this.UIR="[a-zA-Z_][a-zA-Z0-9_]*";this.NR="\\b\\d+(\\.\\d+)?";this.CNR="\\b(0[xX][a-fA-F0-9]+|(\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)";this.BNR="\\b(0b[01]+)";this.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|\\.|-|-=|/|/=|:|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.ER="(?![\\s\\S])";this.BE={b:"\\\\.",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE],r:0};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE],r:0};this.CLCM={cN:"comment",b:"//",e:"$"};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.BNM={cN:"number",b:this.BNR,r:0};this.inherit=function(r,s){var p={};for(var q in r){p[q]=r[q]}if(s){for(var q in s){p[q]=s[q]}}return p}}();hljs.LANGUAGES.cpp=function(){var a={keyword:{"false":1,"int":1,"float":1,"while":1,"private":1,"char":1,"catch":1,"export":1,virtual:1,operator:2,sizeof:2,dynamic_cast:2,typedef:2,const_cast:2,"const":1,struct:1,"for":1,static_cast:2,union:1,namespace:1,unsigned:1,"long":1,"throw":1,"volatile":2,"static":1,"protected":1,bool:1,template:1,mutable:1,"if":1,"public":1,friend:2,"do":1,"return":1,"goto":1,auto:1,"void":2,"enum":1,"else":1,"break":1,"new":1,extern:1,using:1,"true":1,"class":1,asm:1,"case":1,typeid:1,"short":1,reinterpret_cast:2,"default":1,"double":1,register:1,explicit:1,signed:1,typename:1,"try":1,"this":1,"switch":1,"continue":1,wchar_t:1,inline:1,"delete":1,alignof:1,char16_t:1,char32_t:1,constexpr:1,decltype:1,noexcept:1,nullptr:1,static_assert:1,thread_local:1,restrict:1,_Bool:1,complex:1},built_in:{std:1,string:1,cin:1,cout:1,cerr:1,clog:1,stringstream:1,istringstream:1,ostringstream:1,auto_ptr:1,deque:1,list:1,queue:1,stack:1,vector:1,map:1,set:1,bitset:1,multiset:1,multimap:1,unordered_set:1,unordered_map:1,unordered_multiset:1,unordered_multimap:1,array:1,shared_ptr:1}};return{dM:{k:a,i:"</",c:[hljs.CLCM,hljs.CBLCLM,hljs.QSM,{cN:"string",b:"'\\\\?.",e:"'",i:"."},{cN:"number",b:"\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)"},hljs.CNM,{cN:"preprocessor",b:"#",e:"$"},{cN:"stl_container",b:"\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<",e:">",k:a,r:10,c:["self"]}]}}}();hljs.LANGUAGES.r={dM:{c:[hljs.HCM,{cN:"number",b:"\\b0[xX][0-9a-fA-F]+[Li]?\\b",e:hljs.IMMEDIATE_RE,r:0},{cN:"number",b:"\\b\\d+(?:[eE][+\\-]?\\d*)?L\\b",e:hljs.IMMEDIATE_RE,r:0},{cN:"number",b:"\\b\\d+\\.(?!\\d)(?:i\\b)?",e:hljs.IMMEDIATE_RE,r:1},{cN:"number",b:"\\b\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b",e:hljs.IMMEDIATE_RE,r:0},{cN:"number",b:"\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b",e:hljs.IMMEDIATE_RE,r:1},{cN:"keyword",b:"(?:tryCatch|library|setGeneric|setGroupGeneric)\\b",e:hljs.IMMEDIATE_RE,r:10},{cN:"keyword",b:"\\.\\.\\.",e:hljs.IMMEDIATE_RE,r:10},{cN:"keyword",b:"\\.\\.\\d+(?![\\w.])",e:hljs.IMMEDIATE_RE,r:10},{cN:"keyword",b:"\\b(?:function)",e:hljs.IMMEDIATE_RE,r:2},{cN:"keyword",b:"(?:if|in|break|next|repeat|else|for|return|switch|while|try|stop|warning|require|attach|detach|source|setMethod|setClass)\\b",e:hljs.IMMEDIATE_RE,r:1},{cN:"literal",b:"(?:NA|NA_integer_|NA_real_|NA_character_|NA_complex_)\\b",e:hljs.IMMEDIATE_RE,r:10},{cN:"literal",b:"(?:NULL|TRUE|FALSE|T|F|Inf|NaN)\\b",e:hljs.IMMEDIATE_RE,r:1},{cN:"identifier",b:"[a-zA-Z.][a-zA-Z0-9._]*\\b",e:hljs.IMMEDIATE_RE,r:0},{cN:"operator",b:"<\\-(?!\\s*\\d)",e:hljs.IMMEDIATE_RE,r:2},{cN:"operator",b:"\\->|<\\-",e:hljs.IMMEDIATE_RE,r:1},{cN:"operator",b:"%%|~",e:hljs.IMMEDIATE_RE},{cN:"operator",b:">=|<=|==|!=|\\|\\||&&|=|\\+|\\-|\\*|/|\\^|>|<|!|&|\\||\\$|:",e:hljs.IMMEDIATE_RE,r:0},{cN:"operator",b:"%",e:"%",i:"\\n",r:1},{cN:"identifier",b:"`",e:"`",r:0},{cN:"string",b:'"',e:'"',c:[hljs.BE],r:0},{cN:"string",b:"'",e:"'",c:[hljs.BE],r:0},{cN:"paren",b:"[[({\\])}]",e:hljs.IMMEDIATE_RE,r:0}]}};
hljs.initHighlightingOnLoad();
</script>




</head>

<body>
<!-- Automatically generated by RStudio [12861c30b10411e1afa60800200c9a66] -->

<h3>rep_fig2.r</h3>

<p>Allan &mdash; <em>Dec 5, 2013, 2:26 PM</em></p>

<pre><code class="r">###Preparing Data for Public Distribution
##Data was downloaded directly from Qualtrics
set.seed(1355234)
d &lt;- read.csv(&quot;/Users/Allan/Dropbox/!!Papers/Methods/Science Deserves Better/Rep_Att_Survey/2013-08-16-Replication_in_Social_Science.csv&quot;)

# v.names &lt;- d[1,]
# names(d) &lt;- as.character(v.names)
# d[1:3,]

#See the first row for the variable definitions
d &lt;- d[-1,]
#d &lt;- d[d$V1!=&quot;ResponseID&quot;,]

names(d) &lt;- c(&quot;ResponseID&quot;,&quot;ResponseSet&quot;,&quot;Name&quot;, &quot;ExtDataRef&quot;, &quot;Email&quot;, &quot;IP&quot;, &quot;Status&quot;, &quot;StartDate&quot;, &quot;EndDate&quot;, &quot;Finished&quot;,
              &quot;Null&quot;, &quot;Null2&quot;, &quot;Browser&quot;, &quot;Browser.Version&quot;, &quot;OS&quot;, &quot;Resolution&quot;, &quot;Flash&quot;, &quot;Java&quot;, &quot;Agent&quot;, 
              &quot;R1.1&quot;, &quot;R1.2&quot;, &quot;R1.3&quot;, &quot;R1.4&quot;, &quot;R1.5&quot;, &quot;R1.6&quot;, &quot;R1.6.text&quot;, &quot;R2.1&quot;, &quot;R2.2&quot;, &quot;R2.3&quot;, &quot;R2.4&quot;, &quot;R2.5&quot;,
              &quot;R2.6&quot;, &quot;R2.7&quot;, &quot;R2.8&quot;, &quot;R3&quot;, &quot;Journal&quot;, &quot;Year&quot;, &quot;Author&quot;, &quot;Other.Info&quot;, &quot;Contact&quot;, &quot;X&quot;)

#Removing my test answers
d &lt;- d[d$Contact!=&quot;ALlan Dafoe&quot; &amp; d$Contact!=&quot;Allan test&quot; &amp; d$Contact!=&quot;test&quot; &amp; d$R1.6.text!=&quot;allan&quot;,]

#Removing Identifying and Unnecessary Variables
#I removed variables related to the authors of the papers that were replicated so as not to promote unsubstantiated anonymous criticisms.
d &lt;- d[, c(&quot;Name&quot;, &quot;StartDate&quot;, &quot;EndDate&quot;, &quot;Finished&quot;, &quot;R1.1&quot;, &quot;R1.2&quot;, &quot;R1.3&quot;, &quot;R1.4&quot;, &quot;R1.5&quot;, &quot;R1.6&quot;, &quot;R1.6.text&quot;, &quot;R2.1&quot;, &quot;R2.2&quot;, &quot;R2.3&quot;, &quot;R2.4&quot;, &quot;R2.5&quot;,
           &quot;R2.6&quot;, &quot;R2.7&quot;, &quot;R2.8&quot;, &quot;R3&quot;, &quot;Journal&quot;, &quot;Year&quot;)]

setwd(&quot;/Users/Allan/Dropbox/!!Papers/Methods/Science Deserves Better/Rep_Files/&quot;)
write.table(d,file=&quot;Output/rep_data2.csv&quot;,sep=&quot;,&quot;,row.names=F)


####Begin Public Replication Code####
#2013-08-16-Replication_in_Social_Science.csv&quot; is not meant to be public, as it contains criticism of published scholarship that is not verified.
#The relevant file for replication purposes is &quot;rep_data2.csv&quot;, produced using the above code. 
#Specifically rep_data2.csv does not contain identifying information for the papers the respondents tried to replicate, or for the respondents. 

setwd(&quot;/Users/Allan/Dropbox/!!Papers/Methods/Science Deserves Better/Rep_Files/&quot;)
d &lt;- read.csv(&quot;Output/rep_data2.csv&quot;)

#Respondents
levels(d$Name) &lt;- c(&quot;none&quot;, &quot;Dafoe&quot;, &quot;King&quot;, &quot;none&quot;, &quot;Polmeth&quot;)

#&quot;Students who had taken my &quot;Advanced Quantitative Methods&quot; Ph.D. course in 2012 &quot;
sum(d$Name==&quot;Dafoe&quot;)
</code></pre>

<pre><code>[1] 16
</code></pre>

<pre><code class="r">
#&quot;Students who had taken Gary King&#39;s &quot;Advanced Quantitative Political Methodology&quot; Ph.D. course&quot;
sum(d$Name==&quot;King&quot;)
</code></pre>

<pre><code>[1] 29
</code></pre>

<pre><code class="r">
#&quot;Scholars responding to an email I distributed over the Political Methodology listserve &quot;
sum(d$Name==&quot;Polmeth&quot;)
</code></pre>

<pre><code>[1] 144
</code></pre>

<pre><code class="r">
#&quot;responses to the survey&quot;
sum(d$Name==&quot;Polmeth&quot; | d$Name==&quot;King&quot; | d$Name==&quot;Dafoe&quot;)
</code></pre>

<pre><code>[1] 189
</code></pre>

<pre><code class="r">


###Cleaning data###
d$Year
</code></pre>

<pre><code>  [1] 2012                                                                                                                                                                                                                                                                                                    
  [2] 2004                                                                                                                                                                                                                                                                                                    
  [3] 2012                                                                                                                                                                                                                                                                                                    
  [4] 2008                                                                                                                                                                                                                                                                                                    
  [5] 2011                                                                                                                                                                                                                                                                                                    
  [6] 2003                                                                                                                                                                                                                                                                                                    
  [7] 2011                                                                                                                                                                                                                                                                                                    
  [8] 2011                                                                                                                                                                                                                                                                                                    
  [9] 2008                                                                                                                                                                                                                                                                                                    
 [10]                                                                                                                                                                                                                                                                                                         
 [11] 2009                                                                                                                                                                                                                                                                                                    
 [12] 2012                                                                                                                                                                                                                                                                                                    
 [13] 2000                                                                                                                                                                                                                                                                                                    
 [14] 2009                                                                                                                                                                                                                                                                                                    
 [15]                                                                                                                                                                                                                                                                                                         
 [16] 2009                                                                                                                                                                                                                                                                                                    
 [17] 2011                                                                                                                                                                                                                                                                                                    
 [18]                                                                                                                                                                                                                                                                                                         
 [19] 2010                                                                                                                                                                                                                                                                                                    
 [20] 2010                                                                                                                                                                                                                                                                                                    
 [21] 2013                                                                                                                                                                                                                                                                                                    
 [22] 2011                                                                                                                                                                                                                                                                                                    
 [23] 1998                                                                                                                                                                                                                                                                                                    
 [24]                                                                                                                                                                                                                                                                                                         
 [25] 2009                                                                                                                                                                                                                                                                                                    
 [26] 2010                                                                                                                                                                                                                                                                                                    
 [27] 2004                                                                                                                                                                                                                                                                                                    
 [28] 2009                                                                                                                                                                                                                                                                                                    
 [29] 2004                                                                                                                                                                                                                                                                                                    
 [30] 2011                                                                                                                                                                                                                                                                                                    
 [31]                                                                                                                                                                                                                                                                                                         
 [32]                                                                                                                                                                                                                                                                                                         
 [33] 2010                                                                                                                                                                                                                                                                                                    
 [34]                                                                                                                                                                                                                                                                                                         
 [35]                                                                                                                                                                                                                                                                                                         
 [36] 2010                                                                                                                                                                                                                                                                                                    
 [37] 2011                                                                                                                                                                                                                                                                                                    
 [38]                                                                                                                                                                                                                                                                                                         
 [39] 2011                                                                                                                                                                                                                                                                                                    
 [40]                                                                                                                                                                                                                                                                                                         
 [41] .2007                                                                                                                                                                                                                                                                                                   
 [42] 2009                                                                                                                                                                                                                                                                                                    
 [43] 2008                                                                                                                                                                                                                                                                                                    
 [44] 2004                                                                                                                                                                                                                                                                                                    
 [45]                                                                                                                                                                                                                                                                                                         
 [46] 2002                                                                                                                                                                                                                                                                                                    
 [47] 2013                                                                                                                                                                                                                                                                                                    
 [48]                                                                                                                                                                                                                                                                                                         
 [49] 1999                                                                                                                                                                                                                                                                                                    
 [50] 2007                                                                                                                                                                                                                                                                                                    
 [51] 2003                                                                                                                                                                                                                                                                                                    
 [52] 2000                                                                                                                                                                                                                                                                                                    
 [53]                                                                                                                                                                                                                                                                                                         
 [54]                                                                                                                                                                                                                                                                                                         
 [55]                                                                                                                                                                                                                                                                                                         
 [56]                                                                                                                                                                                                                                                                                                         
 [57] 2013                                                                                                                                                                                                                                                                                                    
 [58]                                                                                                                                                                                                                                                                                                         
 [59] 2012                                                                                                                                                                                                                                                                                                    
 [60]                                                                                                                                                                                                                                                                                                         
 [61] 2008                                                                                                                                                                                                                                                                                                    
 [62]                                                                                                                                                                                                                                                                                                         
 [63] 2008                                                                                                                                                                                                                                                                                                    
 [64] 2009                                                                                                                                                                                                                                                                                                    
 [65] 1999                                                                                                                                                                                                                                                                                                    
 [66] 2009                                                                                                                                                                                                                                                                                                    
 [67] 2004                                                                                                                                                                                                                                                                                                    
 [68] 2005                                                                                                                                                                                                                                                                                                    
 [69] 2012                                                                                                                                                                                                                                                                                                    
 [70] 1999                                                                                                                                                                                                                                                                                                    
 [71] 1994                                                                                                                                                                                                                                                                                                    
 [72]                                                                                                                                                                                                                                                                                                         
 [73] 2013                                                                                                                                                                                                                                                                                                    
 [74] 2012                                                                                                                                                                                                                                                                                                    
 [75] 2010                                                                                                                                                                                                                                                                                                    
 [76]  and Civil War\\ from the APSR.  I replicated their original logit analysis and preformed several other analyses including Bayesian Model Averaging, and Random Forests.  I each case I found some of their results to be extremely robust, while others were less robust to alternative specifications.
 [77]                                                                                                                                                                                                                                                                                                         
 [78] 2004                                                                                                                                                                                                                                                                                                    
 [79] 2005                                                                                                                                                                                                                                                                                                    
 [80]                                                                                                                                                                                                                                                                                                         
 [81]                                                                                                                                                                                                                                                                                                         
 [82] 1980                                                                                                                                                                                                                                                                                                    
 [83] 2008                                                                                                                                                                                                                                                                                                    
 [84] 2004                                                                                                                                                                                                                                                                                                    
 [85] 2000                                                                                                                                                                                                                                                                                                    
 [86]                                                                                                                                                                                                                                                                                                         
 [87] 2011                                                                                                                                                                                                                                                                                                    
 [88] 2006                                                                                                                                                                                                                                                                                                    
 [89]                                                                                                                                                                                                                                                                                                         
 [90] 2003                                                                                                                                                                                                                                                                                                    
 [91] 2004                                                                                                                                                                                                                                                                                                    
 [92] 2004                                                                                                                                                                                                                                                                                                    
 [93] 2003                                                                                                                                                                                                                                                                                                    
 [94] 2010                                                                                                                                                                                                                                                                                                    
 [95]                                                                                                                                                                                                                                                                                                         
 [96] 2004                                                                                                                                                                                                                                                                                                    
 [97] 2006                                                                                                                                                                                                                                                                                                    
 [98] 2012                                                                                                                                                                                                                                                                                                    
 [99]                                                                                                                                                                                                                                                                                                         
[100] 1999                                                                                                                                                                                                                                                                                                    
[101] 2004                                                                                                                                                                                                                                                                                                    
[102] 2008                                                                                                                                                                                                                                                                                                    
[103]                                                                                                                                                                                                                                                                                                         
[104]                                                                                                                                                                                                                                                                                                         
[105] 1998                                                                                                                                                                                                                                                                                                    
[106] 2007                                                                                                                                                                                                                                                                                                    
[107]                                                                                                                                                                                                                                                                                                         
[108] 2007                                                                                                                                                                                                                                                                                                    
[109] 1994                                                                                                                                                                                                                                                                                                    
[110] 2010                                                                                                                                                                                                                                                                                                    
[111] 2005                                                                                                                                                                                                                                                                                                    
[112] 2007                                                                                                                                                                                                                                                                                                    
[113]                                                                                                                                                                                                                                                                                                         
[114] 2012                                                                                                                                                                                                                                                                                                    
[115]                                                                                                                                                                                                                                                                                                         
[116]                                                                                                                                                                                                                                                                                                         
[117] 2007                                                                                                                                                                                                                                                                                                    
[118]                                                                                                                                                                                                                                                                                                         
[119] 2009                                                                                                                                                                                                                                                                                                    
[120] 1992                                                                                                                                                                                                                                                                                                    
[121] 2007                                                                                                                                                                                                                                                                                                    
[122] 2005                                                                                                                                                                                                                                                                                                    
[123] 2000                                                                                                                                                                                                                                                                                                    
[124] 2000                                                                                                                                                                                                                                                                                                    
[125] 2006                                                                                                                                                                                                                                                                                                    
[126]                                                                                                                                                                                                                                                                                                         
[127]                                                                                                                                                                                                                                                                                                         
[128]                                                                                                                                                                                                                                                                                                         
[129]                                                                                                                                                                                                                                                                                                         
[130]                                                                                                                                                                                                                                                                                                         
[131]                                                                                                                                                                                                                                                                                                         
[132]                                                                                                                                                                                                                                                                                                         
[133]                                                                                                                                                                                                                                                                                                         
[134]                                                                                                                                                                                                                                                                                                         
[135]                                                                                                                                                                                                                                                                                                         
[136]                                                                                                                                                                                                                                                                                                         
[137]                                                                                                                                                                                                                                                                                                         
[138]                                                                                                                                                                                                                                                                                                         
[139]                                                                                                                                                                                                                                                                                                         
[140]                                                                                                                                                                                                                                                                                                         
[141]                                                                                                                                                                                                                                                                                                         
[142]                                                                                                                                                                                                                                                                                                         
[143]                                                                                                                                                                                                                                                                                                         
[144]                                                                                                                                                                                                                                                                                                         
[145]                                                                                                                                                                                                                                                                                                         
[146]                                                                                                                                                                                                                                                                                                         
[147]                                                                                                                                                                                                                                                                                                         
[148]                                                                                                                                                                                                                                                                                                         
[149]                                                                                                                                                                                                                                                                                                         
[150]                                                                                                                                                                                                                                                                                                         
[151]                                                                                                                                                                                                                                                                                                         
[152]                                                                                                                                                                                                                                                                                                         
[153]                                                                                                                                                                                                                                                                                                         
[154]                                                                                                                                                                                                                                                                                                         
[155]                                                                                                                                                                                                                                                                                                         
[156]                                                                                                                                                                                                                                                                                                         
[157]                                                                                                                                                                                                                                                                                                         
[158]                                                                                                                                                                                                                                                                                                         
[159]                                                                                                                                                                                                                                                                                                         
[160]                                                                                                                                                                                                                                                                                                         
[161]                                                                                                                                                                                                                                                                                                         
[162]                                                                                                                                                                                                                                                                                                         
[163]                                                                                                                                                                                                                                                                                                         
[164]                                                                                                                                                                                                                                                                                                         
[165]                                                                                                                                                                                                                                                                                                         
[166]                                                                                                                                                                                                                                                                                                         
[167]                                                                                                                                                                                                                                                                                                         
[168]                                                                                                                                                                                                                                                                                                         
[169]                                                                                                                                                                                                                                                                                                         
[170]                                                                                                                                                                                                                                                                                                         
[171]                                                                                                                                                                                                                                                                                                         
[172]                                                                                                                                                                                                                                                                                                         
[173]                                                                                                                                                                                                                                                                                                         
[174]                                                                                                                                                                                                                                                                                                         
[175]                                                                                                                                                                                                                                                                                                         
[176]                                                                                                                                                                                                                                                                                                         
[177]                                                                                                                                                                                                                                                                                                         
[178]                                                                                                                                                                                                                                                                                                         
[179]                                                                                                                                                                                                                                                                                                         
[180]                                                                                                                                                                                                                                                                                                         
[181]                                                                                                                                                                                                                                                                                                         
[182]                                                                                                                                                                                                                                                                                                         
[183]                                                                                                                                                                                                                                                                                                         
[184]                                                                                                                                                                                                                                                                                                         
[185]                                                                                                                                                                                                                                                                                                         
[186]                                                                                                                                                                                                                                                                                                         
[187]                                                                                                                                                                                                                                                                                                         
[188] 2006                                                                                                                                                                                                                                                                                                    
[189] 2004                                                                                                                                                                                                                                                                                                    
[190] 2009                                                                                                                                                                                                                                                                                                    
[191]                                                                                                                                                                                                                                                                                                         
21 Levels:  ...
</code></pre>

<pre><code class="r">d$Year[d$Year==&quot;.2007&quot;] &lt;- &quot;2007&quot;

r &lt;- c(&quot;R1.1&quot;,&quot;R1.2&quot;, &quot;R1.3&quot;, &quot;R1.4&quot;, &quot;R1.5&quot;, &quot;R1.6&quot;)

#Filling in 0s
d[,r][is.na(d[,r])] &lt;- 0
d[,r]
</code></pre>

<pre><code>    R1.1 R1.2 R1.3 R1.4 R1.5 R1.6
1      0    0    0    0    1    0
2      1    0    0    0    0    0
3      0    0    0    1    0    0
4      1    0    0    0    0    0
5      0    0    0    0    1    0
6      0    1    0    0    0    0
7      0    0    0    1    0    0
8      0    0    0    1    0    0
9      1    0    0    0    0    0
10     0    0    0    0    1    0
11     0    0    0    0    0    0
12     0    0    0    1    0    0
13     0    1    0    0    0    0
14     0    0    1    0    0    0
15     0    0    0    1    0    0
16     0    0    0    0    0    1
17     0    0    0    0    0    1
18     0    0    0    1    0    0
19     0    1    0    0    0    0
20     0    1    0    0    0    1
21     0    0    0    0    1    0
22     0    1    0    0    0    0
23     1    0    0    0    0    0
24     1    0    0    0    0    0
25     0    0    0    0    0    1
26     1    0    0    0    0    0
27     0    0    0    1    0    0
28     0    0    0    1    0    0
29     0    0    0    1    0    0
30     0    0    0    1    0    0
31     0    0    0    0    0    1
32     0    0    0    0    1    0
33     0    0    0    0    1    1
34     0    0    0    0    1    0
35     0    1    0    0    0    0
36     1    0    0    0    0    0
37     0    0    0    1    0    0
38     0    1    1    0    0    0
39     0    1    0    0    0    0
40     0    1    0    0    0    0
41     1    0    0    0    0    0
42     1    0    0    0    0    0
43     1    0    0    0    0    0
44     0    0    1    0    0    0
45     0    1    0    0    0    0
46     1    1    1    0    0    0
47     0    0    0    0    0    1
48     0    0    0    1    0    0
49     0    1    0    0    0    0
50     0    0    1    0    0    0
51     0    1    0    0    0    0
52     0    1    0    0    0    0
53     0    0    0    1    0    0
54     0    0    0    0    1    0
55     0    1    0    0    0    0
56     0    0    0    0    0    1
57     0    1    0    0    0    0
58     0    0    0    1    0    0
59     0    1    0    0    0    0
60     0    0    1    0    0    0
61     0    0    0    1    0    0
62     0    0    1    0    0    0
63     1    0    0    0    0    0
64     0    0    0    0    1    0
65     0    1    0    0    0    0
66     0    0    1    0    0    0
67     0    1    0    0    0    0
68     0    1    0    0    0    0
69     0    0    1    0    0    0
70     0    0    0    0    1    0
71     0    1    0    0    0    0
72     0    0    1    0    0    0
73     0    0    0    0    0    1
74     0    1    0    0    0    0
75     0    0    0    0    0    1
76     0    0    0    0    1    0
77     0    0    0    0    0    0
78     0    1    0    0    0    0
79     1    0    0    0    0    0
80     0    0    0    0    1    0
81     1    0    0    0    0    0
82     0    0    0    0    1    0
83     0    0    0    1    0    0
84     0    0    1    0    0    0
85     1    0    0    0    0    0
86     0    1    0    0    0    0
87     0    0    1    0    0    0
88     1    0    0    0    0    0
89     1    0    0    0    0    0
90     0    0    0    0    1    0
91     0    0    0    0    1    0
92     0    1    0    0    0    0
93     0    0    0    0    1    0
94     0    0    0    1    0    0
95     0    0    0    1    0    0
96     1    0    0    0    0    0
97     0    0    0    1    0    0
98     0    0    1    0    0    0
99     0    0    0    0    1    0
100    0    1    0    0    0    0
101    0    0    0    1    0    0
102    0    0    0    0    0    1
103    0    0    1    0    0    0
104    0    0    0    0    1    1
105    0    0    0    0    0    1
106    0    0    0    1    0    0
107    0    0    0    0    1    0
108    1    0    0    0    0    0
109    0    1    0    0    0    0
110    0    1    0    0    0    0
111    1    0    0    0    0    0
112    0    1    0    0    0    0
113    0    0    0    1    0    0
114    0    0    1    0    0    1
115    0    0    0    1    0    0
116    0    0    0    1    0    0
117    0    0    0    1    0    0
118    0    1    0    0    0    0
119    0    0    0    0    1    0
120    1    0    0    0    0    0
121    0    0    1    0    0    0
122    0    0    0    0    0    1
123    0    0    0    1    0    0
124    1    0    0    0    0    0
125    0    0    0    0    0    1
126    0    1    0    0    0    0
127    1    0    0    0    0    0
128    0    0    0    1    0    0
129    0    1    0    0    0    0
130    0    1    0    0    0    0
131    1    0    0    0    0    0
132    1    0    0    0    0    0
133    0    1    0    0    0    0
134    0    1    0    0    0    0
135    0    0    0    1    0    0
136    0    0    0    1    0    0
137    1    0    0    0    0    0
138    0    1    0    0    0    0
139    0    0    0    0    0    1
140    1    1    0    0    0    0
141    1    0    0    0    0    0
142    0    0    0    0    0    0
143    1    0    0    0    0    0
144    0    1    0    0    0    0
145    1    0    0    0    0    0
146    1    0    0    0    0    0
147    0    0    1    0    0    0
148    0    0    0    0    1    0
149    1    0    0    0    0    0
150    0    1    0    0    0    0
151    0    0    0    1    0    0
152    0    1    0    0    0    0
153    0    1    0    0    0    0
154    1    0    0    0    0    0
155    0    0    0    1    0    0
156    0    0    0    1    0    0
157    0    0    1    0    0    0
158    0    0    0    1    0    0
159    1    0    0    0    0    0
160    0    0    1    0    0    0
161    1    0    0    0    0    0
162    0    1    0    0    0    0
163    0    0    1    0    0    0
164    0    1    0    0    0    0
165    0    1    0    0    0    0
166    0    0    1    0    0    0
167    0    0    0    1    0    0
168    1    0    0    0    0    0
169    0    0    0    0    0    1
170    0    0    1    0    0    0
171    1    0    0    0    0    0
172    1    0    0    0    0    0
173    1    0    0    0    0    0
174    1    0    0    0    0    0
175    0    0    0    1    0    0
176    0    0    0    1    0    0
177    1    0    0    0    0    0
178    1    0    0    0    1    0
179    1    0    0    0    0    0
180    0    0    1    0    0    0
181    0    0    0    1    0    0
182    0    0    1    0    0    0
183    0    0    1    0    0    0
184    0    0    0    1    0    0
185    0    0    1    0    0    0
186    0    0    0    1    0    0
187    0    0    0    0    0    0
188    0    1    0    0    0    0
189    0    0    0    1    0    0
190    0    0    0    0    0    1
191    1    0    0    0    0    0
</code></pre>

<pre><code class="r">
##Responses
responses.w &lt;- c(&quot;(1) No replication materials were available online.&quot;, 
               &quot;(2) A limited dataset was available to perform the analysis, but no analysis code.&quot;, &quot;(3) A limited dataset was available to perform the analysis and some analysis code.&quot;,
               &quot;(4) A limited dataset was available to perform the analysis and complete analysis code.&quot;, &quot;(5) Many primary datasets were available, as well \n as code to create the final dataset from the \n primary datasets and code to analyze the data.&quot;,
               &quot;(6) Other: please explain&quot;)
responses.w &lt;- gsub(&quot;perform&quot;, &quot;perform \n&quot;, responses.w)

tot &lt;- sum(d$R1.1==1 | d$R1.2==1 | d$R1.3==1 | d$R1.4==1 | d$R1.5==1 | d$R1.6==1)


responses.n &lt;- c(sum(d$R1.1==1)/tot, 
                 sum(d$R1.2==1)/tot, 
                 sum(d$R1.3==1)/tot, 
                 sum(d$R1.4==1)/tot, 
                 sum(d$R1.5==1)/tot, 
                 sum(d$R1.6==1)/tot)
height &lt;- 6
pdf(&#39;Output/Fig2.pdf&#39;, width=1.6*height, height=height)
par(mar=c(5.1, 20, 4.1,2.1))
barplot(responses.n, names.arg=responses.w, horiz=TRUE, las=1  , xlab=&quot;Proportion of Responses&quot;, col=&quot;dark blue&quot;)
dev.off()
</code></pre>

<pre><code>pdf 
  2 
</code></pre>

<pre><code class="r">#main=&quot;Availability of Replication Files (n=192)&quot;

#Responses for Dafoe class
res &lt;- d$Name==&quot;Dafoe&quot;
tot &lt;- sum(d$R1.1[res]==1 | d$R1.2[res]==1 | d$R1.3[res]==1 | d$R1.4[res]==1 | d$R1.5[res]==1 | d$R1.6[res]==1)

responses.n &lt;- c(sum(d$R1.1[res]==1)/tot, 
                 sum(d$R1.2[res]==1)/tot, 
                 sum(d$R1.3[res]==1)/tot, 
                 sum(d$R1.4[res]==1)/tot, 
                 sum(d$R1.5[res]==1)/tot, 
                 sum(d$R1.6[res]==1)/tot)



height &lt;- 6
pdf(&#39;Output/Fig2-c1.pdf&#39;, width=1.6*height, height=height)
par(mar=c(5.1, 20, 4.1,2.1))
barplot(responses.n, names.arg=responses.w, horiz=TRUE, las=1,  main=&quot;Availability of Replication Files (Dafoe&#39;s class, n=16)&quot;, xlab=&quot;Proportion of Responses&quot;, col=&quot;dark blue&quot;)
dev.off()
</code></pre>

<pre><code>pdf 
  2 
</code></pre>

<pre><code class="r">

#Responses for King&#39;s class
res &lt;- d$Name==&quot;King&quot;

tot &lt;- sum(d$R1.1[res]==1 | d$R1.2[res]==1 | d$R1.3[res]==1 | d$R1.4[res]==1 | d$R1.5[res]==1 | d$R1.6[res]==1)

responses.n &lt;- c(sum(d$R1.1[res]==1)/tot, 
                 sum(d$R1.2[res]==1)/tot, 
                 sum(d$R1.3[res]==1)/tot, 
                 sum(d$R1.4[res]==1)/tot, 
                 sum(d$R1.5[res]==1)/tot, 
                 sum(d$R1.6[res]==1)/tot)



height &lt;- 6
pdf(&#39;Output/Fig1-c2.pdf&#39;, width=1.6*height, height=height)
par(mar=c(5.1, 20, 4.1,2.1))
barplot(responses.n, names.arg=responses.w, horiz=TRUE, las=1,  main=&quot;Availability of Replication Files (King&#39;s class, n=29)&quot;, xlab=&quot;Proportion of Responses&quot;, col=&quot;dark blue&quot;)
dev.off()
</code></pre>

<pre><code>pdf 
  2 
</code></pre>

<pre><code class="r">

#Proportion who met standard of providing data and complete analysis code, ignoring Other
#&quot;Ignoring the &quot;Other&quot; category, 36% of these respondents reporte that complete data files and replication code were available&quot;
tot &lt;- d$R1.1==1 | d$R1.2==1 | d$R1.3==1 | d$R1.4==1 | d$R1.5==1 
com &lt;- (d$R1.4==1 | d$R1.5==1) &amp; d$R1.1==0 &amp; d$R1.2==0 &amp; d$R1.3==0
not.com &lt;- (d$R1.1==1 | d$R1.2==1 | d$R1.3==1) &amp; d$R1.4==0 &amp; d$R1.5==0

sum(com)/sum(tot)
</code></pre>

<pre><code>[1] 0.3547
</code></pre>

<pre><code class="r">#36%


#Proportion for which some aspect of replication files were missing
#&quot;whereas 64% reported that some important element of the replication files were missing&quot;
sum(not.com)/sum(tot)
</code></pre>

<pre><code>[1] 0.6395
</code></pre>

<pre><code class="r">#64%


#Second question
#Filling in 0s
r &lt;- c(&quot;R2.1&quot;,&quot;R2.2&quot;, &quot;R2.3&quot;, &quot;R2.4&quot;, &quot;R2.5&quot;, &quot;R2.6&quot;, &quot;R2.7&quot;, &quot;R2.8&quot;)
d[,r][is.na(d[,r])] &lt;- 0
d[,r]
</code></pre>

<pre><code>    R2.1 R2.2 R2.3 R2.4 R2.5 R2.6 R2.7 R2.8
1      0    0    1    0    0    0    0    0
2      0    0    0    0    0    0    0    0
3      0    0    1    0    0    0    0    0
4      0    0    0    0    0    0    0    0
5      0    0    1    0    0    0    0    0
6      0    0    1    1    0    0    1    0
7      0    0    1    0    0    0    0    1
8      0    0    0    0    0    0    0    1
9      0    0    0    0    0    0    0    0
10     0    0    1    0    0    0    1    0
11     0    1    0    0    1    0    1    0
12     0    0    1    0    0    0    0    1
13     0    1    0    0    0    1    1    0
14     0    1    0    1    0    0    0    1
15     0    1    0    0    0    0    1    0
16     0    1    0    1    0    0    0    0
17     0    0    1    0    0    0    1    0
18     0    0    1    0    0    1    0    0
19     1    1    0    1    0    1    0    0
20     0    0    1    0    1    0    1    0
21     0    0    0    0    1    0    0    0
22     0    1    0    1    0    0    0    0
23     0    0    0    0    0    0    0    0
24     0    0    0    0    0    0    0    0
25     0    1    0    1    1    0    0    0
26     0    0    0    0    0    0    0    0
27     0    0    1    0    0    0    0    1
28     0    0    1    0    0    0    0    1
29     0    0    1    0    0    0    0    1
30     0    0    1    0    0    0    1    0
31     0    0    0    0    0    0    0    0
32     0    0    1    0    0    0    0    0
33     0    1    0    0    0    0    0    1
34     0    0    0    0    0    0    0    0
35     0    0    0    0    0    0    0    0
36     0    0    0    0    0    0    0    0
37     0    0    1    1    0    0    0    0
38     0    1    0    0    0    1    0    0
39     0    0    1    0    0    0    0    1
40     0    0    1    0    1    0    0    0
41     0    0    0    0    0    0    0    0
42     0    0    0    0    0    0    0    0
43     0    0    0    0    0    0    0    0
44     0    0    1    0    0    0    0    0
45     1    0    0    0    0    0    0    0
46     0    0    0    0    0    0    0    0
47     0    0    1    0    0    0    0    0
48     0    0    1    0    0    0    0    0
49     0    1    0    0    1    1    0    0
50     0    0    1    0    0    0    0    1
51     0    1    0    0    0    1    1    0
52     1    0    0    0    0    0    0    0
53     0    0    1    0    0    0    0    0
54     0    0    0    0    0    1    0    0
55     0    0    1    0    0    0    0    1
56     0    1    0    0    0    0    1    0
57     0    0    0    0    0    0    0    1
58     0    1    0    0    0    0    0    0
59     0    1    1    1    1    1    0    0
60     0    0    1    0    0    0    0    0
61     0    0    1    0    0    0    0    0
62     0    0    0    0    0    0    1    0
63     0    0    0    0    0    0    0    0
64     0    1    0    0    0    0    0    1
65     0    0    1    0    0    0    0    0
66     1    0    0    0    0    0    0    0
67     0    1    0    0    0    0    0    0
68     0    0    1    0    0    0    0    0
69     0    1    0    0    0    0    0    0
70     0    0    1    0    0    0    0    0
71     1    0    0    0    0    0    0    0
72     0    1    0    0    0    0    0    0
73     0    1    0    0    0    0    0    0
74     0    1    0    1    0    1    0    0
75     1    0    0    0    0    0    0    0
76     0    0    0    0    0    0    0    1
77     0    0    0    0    0    0    0    0
78     0    1    0    0    0    0    0    0
79     0    0    0    0    0    0    0    0
80     0    0    1    0    0    1    1    0
81     0    0    0    0    0    0    0    0
82     0    0    0    0    0    0    0    1
83     0    1    0    0    0    1    1    0
84     0    0    1    0    0    0    1    0
85     0    0    0    0    0    0    0    0
86     1    0    0    0    0    0    0    0
87     0    0    1    0    0    0    0    0
88     0    0    0    0    0    0    0    0
89     0    0    0    0    0    0    0    0
90     0    0    1    1    0    0    0    0
91     0    0    1    0    0    0    0    0
92     1    0    0    0    0    0    0    0
93     0    0    1    1    0    0    0    0
94     0    1    0    0    0    0    0    0
95     0    0    0    0    0    0    0    0
96     0    0    0    0    0    0    0    0
97     0    0    1    0    0    0    0    1
98     0    1    0    0    0    0    0    0
99     0    0    0    0    0    0    0    0
100    0    1    0    0    0    0    0    0
101    0    0    1    0    0    0    0    1
102    0    0    1    0    1    0    0    0
103    1    0    0    0    0    0    1    0
104    0    0    0    0    0    0    0    0
105    1    0    0    0    0    1    1    0
106    0    1    0    0    0    1    0    0
107    0    0    0    0    0    0    0    0
108    0    0    0    0    0    0    0    0
109    0    1    0    0    0    0    0    1
110    0    1    0    0    0    0    0    0
111    0    0    0    0    0    0    0    0
112    0    0    1    0    0    0    0    1
113    0    0    0    0    0    0    0    0
114    0    0    1    0    1    0    1    0
115    0    0    0    0    0    0    0    0
116    0    0    0    0    0    0    0    0
117    0    0    1    0    0    0    0    1
118    0    0    0    0    0    0    1    0
119    0    0    1    0    0    0    0    0
120    0    0    0    0    0    0    0    0
121    0    0    1    0    1    0    0    0
122    0    1    0    0    0    0    0    0
123    0    1    1    0    0    0    0    1
124    0    0    0    0    0    0    0    0
125    0    1    0    0    0    0    0    0
126    0    1    0    1    0    0    1    0
127    0    0    0    0    0    0    0    0
128    0    0    0    0    0    0    0    0
129    0    0    0    0    0    0    0    0
130    0    0    0    0    0    0    0    0
131    0    0    0    0    0    0    0    0
132    0    0    0    0    0    0    0    0
133    0    0    0    0    0    0    0    0
134    0    0    0    0    0    0    0    0
135    0    0    0    0    0    0    0    0
136    0    0    0    0    0    0    0    0
137    0    0    0    0    0    0    0    0
138    0    0    0    0    0    0    0    0
139    0    0    0    0    0    0    0    0
140    0    0    0    0    0    0    0    0
141    0    0    0    0    0    0    0    0
142    0    0    0    0    0    0    0    0
143    0    0    0    0    0    0    0    0
144    0    0    0    0    0    0    0    0
145    0    0    0    0    0    0    0    0
146    0    0    0    0    0    0    0    0
147    0    0    0    0    0    0    0    0
148    0    0    0    0    0    0    0    0
149    0    0    0    0    0    0    0    0
150    0    0    0    0    0    0    0    0
151    0    0    0    0    0    0    0    0
152    0    0    0    0    0    0    0    0
153    0    0    0    0    0    0    0    0
154    0    0    0    0    0    0    0    0
155    0    0    0    0    0    0    0    0
156    0    0    0    0    0    0    0    0
157    0    0    0    0    0    0    0    0
158    0    0    0    0    0    0    0    0
159    0    0    0    0    0    0    0    0
160    0    0    0    0    0    0    0    0
161    0    0    0    0    0    0    0    0
162    0    0    0    0    0    0    0    0
163    0    0    0    0    0    0    0    0
164    0    0    0    0    0    0    0    0
165    0    0    0    0    0    0    0    0
166    0    0    0    0    0    0    0    0
167    0    0    0    0    0    0    0    0
168    0    0    0    0    0    0    0    0
169    0    0    0    0    0    0    0    0
170    0    0    0    0    0    0    0    0
171    0    0    0    0    0    0    0    0
172    0    0    0    0    0    0    0    0
173    0    0    0    0    0    0    0    0
174    0    0    0    0    0    0    0    0
175    0    0    0    0    0    0    0    0
176    0    0    0    0    0    0    0    0
177    0    0    0    0    0    0    0    0
178    0    0    0    0    0    0    0    0
179    0    0    0    0    0    0    0    0
180    0    0    0    0    0    0    0    0
181    0    0    0    0    0    0    0    0
182    0    0    0    0    0    0    0    0
183    0    0    0    0    0    0    0    0
184    0    0    0    0    0    0    0    0
185    0    0    0    0    0    0    0    0
186    0    0    0    0    0    0    0    0
187    0    0    0    0    0    0    0    0
188    1    0    0    0    0    0    0    0
189    0    1    0    0    0    0    0    0
190    0    0    0    0    1    0    1    0
191    0    0    0    0    0    0    0    0
</code></pre>

<pre><code class="r">

responses.w2 &lt;- c(&quot;(1) I was not able to \n approximately reproduce the main results.&quot;, 
                 &quot;(2) I was able to \n approximately reproduce the main results.&quot;, &quot;(3) I was able to precisely reproduce the main results.&quot;,
                 &quot;(4) I found one or more major technical errors,\n though these didn&#39;t change the main results.&quot;, &quot;(5) I found that one or more key results \n were driven by a technical error.&quot;,
                 &quot;(6) I found that one or more key results \n were driven by an arbitrary aspect of their analysis.&quot;, 
                  &quot;(7) I found that one or more key results were fragile \n in a manner that would lead an impartial scholar to \n substantially discount the value of the original study.&quot;,
                  &quot;(8) Most or all of the key results were robust.&quot;)


res &lt;- TRUE
tot &lt;- d$R2.1[res]==1 | d$R2.2[res]==1 | d$R2.3[res]==1 | d$R2.4[res]==1 | d$R2.5[res]==1 | d$R2.6[res]==1 | d$R2.7[res]==1 | d$R2.8[res]==1
tot &lt;- sum(tot)

responses.n2 &lt;- c(sum(d$R2.1[res]==1)/tot, 
                 sum(d$R2.2[res]==1)/tot, 
                 sum(d$R2.3[res]==1)/tot, 
                 sum(d$R2.4[res]==1)/tot, 
                 sum(d$R2.5[res]==1)/tot, 
                 sum(d$R2.6[res]==1)/tot,
                 sum(d$R2.7[res]==1)/tot,
                 sum(d$R2.8[res]==1)/tot)


height &lt;- 8
pdf(&#39;Output/Fig3.pdf&#39;, width=1.6*height, height=height)
par(mar=c(5.1, 22, 4.1,2.1))
barplot(responses.n2, names.arg=responses.w2, horiz=TRUE, las=1, xlab=&quot;Proportion of Responses&quot;, col=&quot;dark blue&quot;)
dev.off()
</code></pre>

<pre><code>pdf 
  2 
</code></pre>

<pre><code class="r"># main=&quot;`Please describe the results of your replication efforts (select all that apply).&#39;&quot;,


#Proportion claiming to precisely replicate results. 
#&quot;On the one hand, of those who responded to the reproducibility of the result (responses 1-3), 52% reported that they were “able to precisely reproduce the main results” and only 13% reported that they were “not able to approximately reproduce the main results.”&quot;
tot &lt;- sum(d$R2.1==1 | d$R2.2==1 | d$R2.3==1) 
sum(d$R2.3==1)/tot
</code></pre>

<pre><code>[1] 0.5172
</code></pre>

<pre><code class="r">
sum(d$R2.1==1)/tot
</code></pre>

<pre><code>[1] 0.1264
</code></pre>

<pre><code class="r">
#Proportion of respondents reporting robust, out of all reporting about robustness.
#&quot;Of those who responded to the robustness of the results (responses 4-8), 36% reported that “most or all of the key results were robust”, 20% that there were “major technical errors though these didn’t change the main results”, and 56% that results were not robust (responses 5-7).&quot;
sum(d$R2.8)/sum(d$R2.4==1 | d$R2.5==1 | d$R2.6==1 | d$R2.7==1 | d$R2.8)
</code></pre>

<pre><code>[1] 0.3559
</code></pre>

<pre><code class="r">sum(d$R2.4==1)/sum(d$R2.4==1 | d$R2.5==1 | d$R2.6==1 | d$R2.7==1 | d$R2.8)
</code></pre>

<pre><code>[1] 0.2034
</code></pre>

<pre><code class="r">sum(d$R2.5==1 | d$R2.6==1 | d$R2.7==1)/sum(d$R2.4==1 | d$R2.5==1 | d$R2.6==1 | d$R2.7==1 | d$R2.8)
</code></pre>

<pre><code>[1] 0.5593
</code></pre>

<pre><code class="r">
</code></pre>

</body>

</html>

